From: verdre Date: Mon, 19 Nov 2018 11:28:28 +0000 (+0100) Subject: workspace: Use globals for delays and animation times X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~897^2^2~64 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=193e4ae31ea585fb3da2e2d0e0083c9c06eec01f;p=gnome-shell.git workspace: Use globals for delays and animation times https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/346 --- diff --git a/js/ui/workspace.js b/js/ui/workspace.js index f3b557e7e..6e3be18a6 100644 --- a/js/ui/workspace.js +++ b/js/ui/workspace.js @@ -22,8 +22,11 @@ var WINDOW_DND_SIZE = 256; var WINDOW_CLONE_MAXIMUM_SCALE = 1.0; +var WINDOW_OVERLAY_IDLE_HIDE_TIMEOUT = 750; var CLOSE_BUTTON_FADE_TIME = 0.1; +var WINDOW_REPOSITIONING_DELAY = 750; + var DRAGGING_WINDOW_OPACITY = 100; // When calculating a layout, we calculate the scale of windows and the percent @@ -674,7 +677,7 @@ var WindowOverlay = class { _onHideChrome() { if (this._idleToggleCloseId == 0) { - this._idleToggleCloseId = Mainloop.timeout_add(750, this._idleToggleCloseButton.bind(this)); + this._idleToggleCloseId = Mainloop.timeout_add(WINDOW_OVERLAY_IDLE_HIDE_TIMEOUT, this._idleToggleCloseButton.bind(this)); GLib.Source.set_name_by_id(this._idleToggleCloseId, '[gnome-shell] this._idleToggleCloseButton'); } } @@ -1477,7 +1480,7 @@ var Workspace = class { this._cursorY = y; this._currentLayout = null; - this._repositionWindowsId = Mainloop.timeout_add(750, + this._repositionWindowsId = Mainloop.timeout_add(WINDOW_REPOSITIONING_DELAY, this._delayedWindowRepositioning.bind(this)); GLib.Source.set_name_by_id(this._repositionWindowsId, '[gnome-shell] this._delayedWindowRepositioning'); }